package com.harry.martin_skill_master.adapter;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;

import java.util.List;

/**
 * @author Martin-harry
 * @date 2021/8/10
 * @address
 * @Desc Adapter适配器
 */
public class PagerFragmentAdapter extends FragmentStatePagerAdapter {
    private final List<Fragment> lists;

    public PagerFragmentAdapter(FragmentManager fm, List<Fragment> list) {
        super(fm);
        this.lists = list;
    }

    @Override
    public Fragment getItem(int position) {
        return lists.get(position);
    }

    @Override
    public int getCount() {
        return 3;
    }
}